<template>
  <div v-if="flag" class="box">
    <div class="close" @click="flag = false">+</div>
    <video class="video" :src="url" controls />
  </div>
</template>

<script>
export default {
  data() {
    return {
      flag: false,
      url: ''
    }
  }
}
</script>

<style lang="scss" scope>
.box {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.3);
  .close {
    position: absolute;
    top: 0;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotateZ(45deg);
    color: #fff;
    font-size: 40px;
  }
  .video {
    width: 800px;
    height: 600px;
  }
}
</style>
